<template>
    <van-search shape="round" v-model="value" placeholder="请输入搜索关键词" @search="onSearch" @cancel="onCancel">
    </van-search>
    <HomeSwiper></HomeSwiper>
    <HomeGrid></HomeGrid>
    <HomeProduct></HomeProduct>
    <HomeNew></HomeNew>
    <HomeTop></HomeTop>
</template>

<script setup>
import { ref } from 'vue'
import { showToast } from 'vant'
import HomeSwiper from '@/components/Home/HomeSwiper.vue'
import HomeGrid from '@/components/Home/HomeGrid.vue';
import HomeProduct from '@/components/Home/HomeProduct.vue';
import HomeNew from '@/components/Home/HomeNew.vue';
import HomeTop from '@/components/Home/HomeTop.vue';

const value= ref('')
const onSearch = (val) => { showToast(val) }
const onCancel = () => { 
    showToast('cancel')
    value.value=''
}
</script>